<!-- 媒体选择模态 -->
<nd-media-select media="pageMedia"></nd-media-select>

<div class="page-header clearfix">
  <ol class="heading">
    <li><a ui-sref="main.pages({ page: _id })">{{name}}</a></li>
  </ol>
</div>

<form ng-submit="savePage()" id="pageForm" name="pageForm" novalidate>
  <div class="row">
    <div ng-class="{ 'col-md-9': editAuth, 'col-md-12': !editAuth }">
      <div class="panel panel-default">
        <div ng-class="{ 'clear-bottom-padding': editAuth }" class="panel-body">
          <div ng-if="readAuth && !editAuth" ng-bind-html="pageContent"></div>
          <nd-editor ng-if="editAuth" content="$parent.pageContent" media="$parent.pageMedia" disabled="transmitting" rows="22"></nd-editor>
        </div>
      </div>
    </div>
    <div ng-if="editAuth" class="col-md-3">
      <div class="panel panel-default">
        <div class="panel-heading">发布</div>
        <div class="panel-body">
          <button ng-disabled="transmitting || pageForm.$invalid" class="btn btn-primary btn-block" type="submit" form="pageForm"><i class="fa fa-paper-plane"></i> 更新单页</button>
        </div>
      </div>
    </div>
  </div>
</form>